<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="前移库调拨申请" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addApply()"
                    >新增</button>
                    </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color" >
                            <div translate translate-attr-title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl" download-param="exportParam.sectionParam"
                                    download-key="ids">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出</span>
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出全部</span>
                                </li>
                            </ul>
                        </div>

                    </div>
                    <button class="btn-advance pull-right m-l-xs"
                        ng-click="switchToolbar('AdvanceSearch')"
                        translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search"
                            translate translate-attr-placeholder="单据编号"
                            ng-model="condition.billNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()" date-picker="true" hide-date="switchDatePicker()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>单据编号</span>：</label>
                        <input type="text" name="billNo" ng-model="condition.billNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>单据编号</span>：</label>
                        <textarea ng-model="condition.billNoList" class="form-control" placeholder="逗号分隔或者换行分隔">
                        </textarea>
                    </div>
                    <div class="form-group clearfix" ng-if="btnPermission.stockAllocationEditTJ">
                        <label class="control-label"><span translate>供货商名称</span>：</label>
                        <input type="text" name="supplierOrgName" ng-model="condition.supplierOrgName" class="form-control">
                    </div>
                    <div class="form-group clearfix" ng-if="btnPermission.stockAllocationEditTJ">
                        <label class="control-label"><span translate>申请机构名称</span>：</label>
                        <input type="text" name="applyOrgName" ng-model="condition.applyOrgName" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <input type="text" name="materialNo" ng-model="condition.materialNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>状态</span>：</label>
                        <select ng-model="condition.status" class="form-control"
                        ng-options="item.code as (item.name|translate) for item in stateList">
                        <option value="" translate>请选择</option>
                    </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>出库仓库编号</span>：</label>
                        <input type="text" name="outWarehouseCode" ng-model="condition.outWarehouseCode"
                            class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>入库仓库编号</span>：</label>
                        <input type="text" ng-model="condition.inWarehouseCode" class="form-control">
                    </div>


                    <div class="form-group clearfix" ng-if="$parent.isKJ">
                        <label class="control-label"><span translate>申请人</span>：</label>
                        <input type="text" ng-model="condition.createName" class="form-control">
                    </div>
                    <div class="form-group clearfix" ng-if="$parent.isKJ">
                        <label class="control-label"><span translate>调度员</span>：</label>
                        <input type="text" ng-model="condition.dispatcherName" class="form-control">
                    </div>
                    <div class="form-group clearfix" ng-if="$parent.isKJ">
                        <label class="control-label"><span translate>申请机构</span>：</label>
                        <input type="text" ng-model="condition.applyOrgName" class="form-control">
                    </div>
                    <div class="form-group clearfix" ng-if="$parent.isKJ">
                        <label class="control-label"><span translate>创建状态</span>：</label>
                        <select ng-model="condition.createStatusStr" class="form-control"
                                >
                            <option value="" translate>请选择</option>
                            <option value="0" translate>未创建</option>
                            <option value="1" translate>进行中</option>
                            <option value="2" translate>已完成</option>
                            <option value="1,2" translate>进行中+已完成</option>
                        </select>
                    </div>

                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"><span translate>制单时间</span>：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startCreateTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerBegin = !showDatepickerBegin"
                               ng-change="checkDate(condition, 'startCreateTime', 'endCreateTime')"
                               is-open="showDatepickerBegin" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endCreateTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerEnd = !showDatepickerEnd"
                               ng-change="checkDate(condition, 'startCreateTime', 'endCreateTime')"
                               is-open="showDatepickerEnd" close-text="关闭" modal-size="small" readonly>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                has-check-col="true"  set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfo.allCheckedBill"
                                            yb-click="selectAll(dataList, 'Bill')"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.billFixedWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(tableConfig.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, dataList, 'Bill')"></div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="(!itemCol.clickFn && itemCol.type !== 'operate') || !!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] != '同步失败'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="(!!itemCol.clickFn && itemCol.type != 'synSap') || (!!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] == '同步失败')">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-click="auditBillBatch(item)"
                                                ng-disabled="item.status == 2 || item.status == 0 || item.status == 3|| item.status == 4|| curOrg.companyType == 2 || !btnPermission.ApplicationForWard "
                                                translate translate-attr-title="{{!btnPermission.ApplicationForWard?'无权限执行此操作':''}}"
                                                >审核</button>
                                            <button type="button" class="btn btn-operate m-r-xs" translate
                                                ng-click="editApply(item)"
                                                ng-disabled="item.status != 0 && item.status != 3 "
                                               >编辑</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                    ng-click="finishApply(item)"
                                                    translate translate-attr-title="{{!btnPermission.FinishApply?'无权限执行此操作':''}}"
                                                    ng-disabled="!(item.status == 2 && item.createStatus != 2)||!btnPermission.FinishApply"
                                            >结单</button>
                                            <button type="button" class="btn btn-operate m-r-xs"
                                                ng-disabled="item.status != 0 && item.status != 3 "
                                                ng-click="delApply(item.id)"
                                                >删除</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="(!itemCol.clickFn && itemCol.type !== 'operate') || !!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] != '同步失败'">{{item[itemCol.dataField]}}</span>
                                        <span
                                            ng-if="!!itemCol.clickFn && itemCol.type == 'synCRM' && item[itemCol.dataField] != '同步失败'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="(!!itemCol.clickFn && itemCol.type != 'synSap'&& itemCol.type != 'synCRM') || ((!!itemCol.clickFn && itemCol.type == 'synSap' || !!itemCol.clickFn && itemCol.type == 'synCRM') && item[itemCol.dataField] == '同步失败')">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allCheckedBill" yb-check-name="全选"
                    yb-click="selectAll(dataList, 'Bill')"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>

        <div tab heading="{{tabFlag.name}}" active="activeFlag[2]" ng-if="activeFlag[2]">
            <form name="orderForm" class="m-t-sm form-horizontal form-up-tb border-b clearfix" novalidate>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'">
                    <label class="col-xs-4 control-label max-w-100"><span translate>申请单号</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.billNo||'-'}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>代理商名称</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.applyOrgName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>主机厂名称</span>：</label>
                    <div class="col-xs-8 wrapper-none" ng-if="!orderObj.headerInfo.id">
                        <div yb-form-clear ng-model="orderObj.headerInfo.supplierOrgName" select-obj="selectSupplier()"
                            clear-form="clearSupplier()" tips-name="接收单位" form-require="true"></div>
                        <div class="msg-block" ng-if="!orderObj.headerInfo.supplierOrgName && submitted">
                            <div class="error-msg" translate>
                                <div class="msg-triangle"></div>
                                请选择接收单位
                            </div>
                        </div>
                    </div>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots" ng-if="orderObj.headerInfo.id">
                        {{orderObj.headerInfo.supplierOrgName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>调出仓库</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div yb-form-clear ng-model="orderObj.headerInfo.outWarehouseCode"
                            select-obj="selectWarehouse('out')" clear-form="clearWarehouse('out')" tips-name="调出仓库"
                             ></div>

                        <div class="msg-block" ng-if="!orderObj.headerInfo.outWarehouseCode && submitted">
                            <div class="error-msg">
                                <div class="msg-triangle"></div>
                                <span translate>请选择调出仓库</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>调入仓库</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <div yb-form-clear ng-model="orderObj.headerInfo.inWarehouseCode"
                             select-obj="selectInWarehouse()"  form-require="true" clear-form="clearWarehouse('in')" tips-name="调入仓库"
                        ></div>

                        <div class="msg-block" ng-if="!orderObj.headerInfo.inWarehouseCode && submitted">
                            <div class="error-msg">
                                <div class="msg-triangle"></div>
                                <span translate>请选择调入仓库</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>申请人</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.createName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'">
                    <label class="col-xs-4 control-label max-w-100"><span translate>申请时间</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.createDate|YbDate}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'">
                    <label class="col-xs-4 control-label max-w-100"><span translate>审核人</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.auditName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'">
                    <label class="col-xs-4 control-label max-w-100"><span translate>审核时间</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.auditDate|YbDate}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'">
                    <label class="col-xs-4 control-label max-w-100"><span translate>单据状态</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.statusShow}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>调度员</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="dispatcherName" class="form-control light-bg"
                            ng-model="orderObj.headerInfo.dispatcherName" ng-click="searchDispatch()" required yb-focus
                            readonly translate translate-attr-placeholder="请选择">

                        <div class="msg-block"
                            ng-if="orderForm.dispatcherName.$dirty || (orderForm.dispatcherName.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="orderForm.dispatcherName.$error.required && !orderForm.dispatcherName.focused">
                                <div class="msg-triangle"></div>
                                <span translate>必填项，请填写</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>收货人</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" class="form-control" ng-model="orderObj.headerInfo.receiveUser">
                    </div>
<!--                    <div class="col-xs-2 p-l-sm p-r-none control-btn">-->
<!--                        <button class="btn btn-default form-control" type="button"-->
<!--                                ng-click="searchAddress(orderObj.receiverName)" translate>搜索</button>-->
<!--                    </div>-->
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>收货人联系方式</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" class="form-control" ng-model="orderObj.headerInfo.receiveTel">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>收货人地址</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" class="form-control" ng-model="orderObj.headerInfo.receiveAddress">
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>备注</span>：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" class="form-control" ng-model="orderObj.headerInfo.remark">
                    </div>
                </div>
            </form>
            <div class="row wrapper-y-xs">
                <div class="col-xs-12 operate-bar font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="selMateriel($event)" translate>选择零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importMateriel()" translate>导入零件</button>
                    <button class="btn btn-operate m-r-sm" ng-click="batchDelMateriel()" translate>批量删除</button>
                </div>
            </div>
            <!-- <div materiel-selector show-toolbar="toolbarConfig.showMateriel" is-default-warehouse="true"
                selected-list="orderObj.materialList"
                warehouse-code="orderObj.headerInfo.outLocation" area-code="orderObj.headerInfo.outArea"
                mark-stock-status="true"></div> -->
            <div materiel-selector show-toolbar="toolbarConfig.showMateriel" sold-org-id="orderObj.headerInfo.supplierOrgId"
                 is-purchase="true"
                 selected-list="orderObj.materialList" replace-check="true"></div>
            <div class="main-area d-b-60" ng-style="{top: tabFlag.name == '新增'? '220px': '260px'}">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="th-check text-center">
                                        <div yb-check-box yb-checked="markInfo.allCheckedMaterial"
                                            yb-click="selectAll(orderObj.materialList, 'Material')"></div>
                                    </th>
                                    <th width="60" class="text-center" translate>
                                        操作
                                    </th>
                                    <th width="60" class="text-center" translate>
                                        序号
                                    </th>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="materielTableConfig.targetWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in orderObj.materialList track by $index">
                                    <td width="40" class="text-center">
                                        <div yb-check-box yb-checked="item.isChecked"
                                            yb-click="selectSingle(item, orderObj.materialList, 'Material')"></div>
                                    </td>
                                    <td width="60">
                                        {{$index + 1}}
                                    </td>
                                    <td width="60">
                                        <button type="button" class="btn btn-operate"
                                            ng-click="delMateriel(item, $index)" translate>删除</button>
                                    </td>
                                    <td ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        <div class="spill-dots" ng-if="!itemCol.needInput">
                                            <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                                ng-if="!!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </a>
                                            <span ng-if="!itemCol.clickFn">
                                                {{item[itemCol.dataField]}}
                                            </span>
                                        </div>
                                        <div class="td-edit pos-r" ng-if="itemCol.needInput && itemCol.dataField != 'remark'">
                                            <input ng-if="!itemCol.needRequired" type="text" class="form-control"
                                                ng-model="item[itemCol.dataField]" maxlength="20">
                                            <input ng-if="itemCol.needRequired" type="text" class="form-control"
                                                ng-model="item[itemCol.dataField]" ng-focus="showQtyTip(item)"
                                                ng-blur="hideQtyTip(item)" ng-change="checkQtyForAdd(item)"
                                                yb-number-input max="99999.999" maxlength="9" disable-decimal="false"
                                                decimal-places="3" ng-class="{'error': item.qtyErr}">
                                            <div class="pos-a tool-tips"
                                                ng-if="!!item.qtyErr">
                                                <i class="triangle"></i>
                                                <div class="msg" translate>申请数量不能为空和0</div>
                                            </div>
                                        </div>
                                        <div class="td-edit pos-r" ng-if="itemCol.needInput && itemCol.dataField == 'remark'">
                                            <input ng-if="!itemCol.needRequired" type="text" class="form-control"
                                                ng-model="item[itemCol.dataField]" maxlength="99">
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="saveData('save', orderForm.$valid)" translate>提交</button>
                <button type="button" class="btn btn-primary m-r-sm"
                    ng-click="saveData('setting', orderForm.$valid)" translate>保存</button>
                <button type="button" class="btn btn-default" ng-click="cancel()" translate>取消</button>
            </div>
        </div>
        <div tab heading="查看" active="activeFlag[3]" ng-if="activeFlag[3]">
            <form name="orderForm" class="m-t-sm form-horizontal form-up-tb border-b clearfix" novalidate>
                <div class="form-group col-xs-3 m-b-sm" ng-if="tabFlag.name != '新增'">
                    <label class="col-xs-4 control-label max-w-100"><span translate>申请单号</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.billNo||'-'}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>代理商名称</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.applyOrgName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>主机厂名称</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.supplierOrgName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>调出仓库</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.outWarehouseCode}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>调入仓库</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.inWarehouseCode}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>申请人</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.createName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>申请时间</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.createDate|YbDate}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>审核人</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.auditName}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>审核时间</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.auditDate|YbDate}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100"><span translate>单据状态</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.statusShow}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>备注</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.remark}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>调度员</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.dispatcherName}}
                    </label>
                </div>

                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>收货人</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.receiveUser}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>收货人联系方式</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.receiveTel}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>收货人地址</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.receiveAddress}}
                    </label>
                </div>
                <div class="form-group col-xs-3 m-b-sm" >
                    <label class="col-xs-4 control-label max-w-100"><span translate>审核意见</span>：</label>
                    <label class="col-xs-8 control-label p-l-n text-left spill-dots">
                        {{orderObj.headerInfo.auditMessage}}
                    </label>
                </div>
            </form>
            <div class="main-area d-b-60" ng-style="{top:'210px'}">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="60" class="text-center" translate>
                                        序号
                                    </th>
                                    <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="materielTableConfig.targetWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in orderObj.materialList track by $index">
                                    <td width="60">
                                        {{$index + 1}}
                                    </td>
                                    <td ng-repeat="itemCol in materielTableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        <div class="spill-dots" ng-if="!itemCol.needInput">
                                            <span>
                                                {{item[itemCol.dataField]}}
                                            </span>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="cancel()" translate>取消</button>
            </div>
        </div>
    </div>
</div>
